/******************************init****************************/
function queryTran(page) {
	var parm = $('#queryTranForm').serialize() + (page != null ? ('&page=' + page) : '');
	var url = create_url('tran-query');
	sys_record_parm('tran',parm);
	sys_loading();
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_loading_close();
			$('#tranResultList').html(result);
		}
	});
}

/*************edit*****************/
function saveTran() {
	var parm = $('#editTranForm').serialize() + '&content=' + fixJqText(Url.encode(content.getData()));
	console.log(parm);
	var url = create_url('tran-save');
	sys_submiting();
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_submiting_close();
			if ('success' == result) {
				sys_msg('操作成功!');
				sys_load_handle('tran');
			}else{
				sys_msg('操作失败!');
			}
		}
	});
}

function deleteSelectedItem(btn) {
	btn.parents('.rep').remove();
}

function selectTranCourses(){
	var url = create_url('tran-courseInit');
	var parm = null;
	$.colorbox({overlayClose:false, href:url, data:parm, close:'[关闭]', width:'800px', height:'600px', open:true});
}

function setCover(){
	var cover = $("input[name=choose]:checked").val();
	$("#fileCode").val(cover);
}